// uno.config.ts
import { defineConfig, presetUno, presetIcons } from "unocss"
import { animatedUno } from "animated-unocss"

export default defineConfig({
    // ...UnoCSS options
    presets: [
        presetUno(),
        animatedUno(),
        presetIcons({
            prefix: "i-",
            extraProperties: {
                display: "inline-block",
            },
        }),
    ],
    rules: [
        [
            /^ad-(\d+)$/,
            ([, d]) => ({ "animation-duration": `${d}ms` }),
            { layer: "utilities", autocomplete: "ad-<num>" },
        ],
    ],
    shortcuts: {
        "flex-center": "flex justify-center items-center",
        "size-full": "w-full h-full",
    },
    layers: {
        default: -1,
        base: 0,
        utilities: 1,
        components: 2,
    },
})
